package manager;

import entities.Patient;
import entities.PatientMaterial;
import entities.User;
import entities.ViewPatientMaterial;
import entities.ViewScheduler;
import java.util.ArrayList;
import java.util.Date;

public class AdminBusiDriver {

    private DataManager dataManager;

    public AdminBusiDriver(DataManager dataManager) {
        this.dataManager = dataManager;
    }

    public ArrayList<Patient> showPatient() {
        return dataManager.showPatient();
    }

    public Patient showPatientByIDC(String idc) {
        return dataManager.showPatientByIDC(idc);
    }

    public boolean insertPatient(Patient patient) {
        return dataManager.insertPatient(patient);
    }

    public boolean updatePatient(Patient patient) {
        return dataManager.updatePatient(patient);
    }

    public boolean deletePatient(Patient patient) {
        return dataManager.deletePatient(patient);
    }

    public ArrayList<ViewPatientMaterial> ShowInfoPatientMaterial() {
        return dataManager.showViewPMaterial();
    }

    public boolean insertPatientMaterial(PatientMaterial record) {
        return dataManager.insertPatientMaterial(record);
    }

    public boolean updatePatientMaterial(PatientMaterial record) {
        return dataManager.updatePatientMaterial(record);
    }

    public boolean deletePatientMaterial(PatientMaterial record) {
        return dataManager.deletePatientMaterial(record);
    }

    public ViewPatientMaterial showViewPMaterialByPK(int pid, int did, Date date) {
        return dataManager.showViewPMaterialByPK(pid, did, date);
    }

    public ArrayList<User> showDoctor() {
        return dataManager.showDoctor();
    }
    
    public ArrayList<ViewScheduler> showViewDoctorScheduler() {
        return dataManager.showViewDoctorScheduler();
    }
    
    public ArrayList<ViewScheduler> showEmployeeDepH() {
        int employeeID = dataManager.getUser().getUserID();
        return dataManager.showViewSchedulerByEID(employeeID);
    }
}
